package com.csg.ioms.controller;

import com.csg.ioms.enums.CommonStateEnums;
import com.csg.ioms.result.Result;
import com.csg.ioms.service.SchedulerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p></p>
 *
 * @author George Chan
 * @version 1.0
 * @date 2020/3/26 13:17
 * @since JDK 1.8
 */
@RestController
@RequestMapping("/feign")
public class FeignController {
    @Autowired
    private SchedulerService schedulerService;

    @RequestMapping(value = "/testremote")
    public Result feign() {
        Object object = schedulerService.remote();
        return new Result(true, CommonStateEnums.SUCCESS.getCode(), CommonStateEnums.SUCCESS.getMessage(), object);
    }
}
